package com.junchao.peng.pojo;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author dell
 */
public class File implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;
    private String name;
    private String type;
    private Double size;
    private String path;

    public File(Integer id, String name, Double size, String type, String path) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.path = path;
        this.size = size;
    }

    public File() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Double getSize() {
        return size;
    }

    public void setSize(Double size) {
        this.size = size;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof File)) {
            return false;
        }
        File file = (File) o;
        return getId().equals(file.getId()) && getName().equals(file.getName()) && getType().equals(file.getType()) && getPath().equals(file.getPath()) && getSize().equals(file.getSize());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getName(), getType(), getPath(), getSize());
    }

    @Override
    public String toString() {
        return "File{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", path='" + path + '\'' +
                ", size=" + size +
                '}';
    }
}
